from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_core.messages import HumanMessage

prompt_template = ChatPromptTemplate.from_messages([
    ("system", "You are a helpful assistant"),
    MessagesPlaceholder("replace_msgs")
])

result = prompt_template.invoke({"replace_msgs":[HumanMessage(content="hi!"),HumanMessage(content="hello, what can I do for you?")]})
print(result)